<template>
  <div id="wrap">
    <h1>defineEmits带类型声明</h1>
    <!-- 子组件SonDemo11 -->
    <SonDemo11
    @custom-event="handleCustomEvent"
    @submit="handleSubmit"
    ></SonDemo11>
    <hr />
  </div>
</template>

<script lang="ts">
export default {
  name: 'dayStuDemo41.vue',
};
</script>

<script lang="ts" setup>
// import { ref } from 'vue';
import SonDemo11 from './components/SonDemo11.vue';
// 子组件SonDemo11 传递多个参数
const handleCustomEvent = (message:string) => {
  console.log(message);
}
const handleSubmit = (payload:{email:string;passworld:string}) => {
  console.log(payload.email,payload.passworld);
  const result = payload.email === payload.passworld
  console.log(result); // true / false

}
</script>

<style lang="scss"></style>
